/**
 * Created by zxh on 14-7-11.
 */

ms.UIYaoShi = ms.UILayer.extend({
    ctor: function() {
        this._super();
        this._ccsFileName = "bingshi.json";
    },

    onEnter: function() {
        this._super();
        this._continueButton.setVisible(false);
        ccs.actionManager.playActionByName(this._ccsFileName, "a1");

    },

    onButtonYaoShiTouchEnded: function() {
        ccs.actionManager.playActionByName(this._ccsFileName, "a2");
    },

    onCloseButtonTouchEnded: function(sender) {
        sender.getParent().setPositionX(1314);
        if (sender.getParent().getName() === "_ImageZhenZhuang") {
            this._continueButton.setVisible(true);
        } else {
            ccs.actionManager.playActionByName(this._ccsFileName, "a3");
        }
    },

    onButton1TouchEnded: function() {
        //cc.log("1");
        this._text1.setString("       情绪低落，觉得开心不起来，严重时觉得活着没意思，但无消极行为。");
        this._text2.setString("       做事缺乏兴趣，易烦躁，易激惹，不愿做家务，不愿探望父母，不愿与人主动交谈。");
    },

    onButton2TouchEnded: function() {
        //cc.log("2");
        this._text1.setString("        夜间失眠明显，表现为入睡困难，睡眠时间由过去的9-10小时减少到4-5小时。");
        this._text2.setString("        白天感头昏、乏力，思考问题不清晰。\n    无头痛、发热情况。");
    },

    onButton3TouchEnded: function() {
        this._text1.setString("        因自己生病拖累家人而自责，认为自己很没有用，外出时总觉得别人在笑话自己。");
        this._text2.setString("        有时莫名用手敲打头部，喃喃自语，家人陈述其重复“嗒嗒、么么”的字语，称家人有难自己愿意顶罪。");
    },

    onContinueButtonTouchEnded: function() {
        cc.director.runScene(ms.createScene(ms.UIZhenDuan));
    },
});